<?php
/* @var $this StrukturOrganisasiController */
/* @var $model StrukturOrganisasi */
/* @var $form CActiveForm */
?>
<?php $this->beginWidget('ext.widgets.XPanel', array('title' => 'Struktur Organisasis', 'width' => 900,'height' => 500)); 
?>
<div class="form">

<?php $form=$this->beginWidget('ext.CAxActiveForm', array(
	'id'=>'struktur-organisasi-form',
	'enableAjaxValidation'=>false,
)); ?>

	<p class="note">Fields with <span class="required">*</span> are required.</p>

	<?php echo $form->errorSummary($model); ?>
    <table class="ma-table">
        <tbody>
	<tr>
		<td class="labelfield" style="width:200px"><?php echo $form->labelEx($model,'nama'); ?>
</td>
		<td><?php echo CHtml::activeTextField($model,'nama'); ?>
</td>
		<td><?php echo $form->error($model,'nama'); ?>
</td>
	</tr>

	<tr>
            <td class="labelfield" style="width:200px"><?php echo CHtml::label('Parent', NULL) ?></td>
            <td><?php echo CHtml::activeDropDownList(
                                $model, 
                                'parent_id', 
                                $list, 
                                array(
                                    'empty'=>'-- Pilih --',
                                    'options'=>array(
                                        $model->parent_id => array(
                                            'selected'=>TRUE
                                            )
                                    )
                                )
                            ) ?></td>
            <td></td>
	</tr>

	<tr>
		<td></td>
                <td>
                    <?php echo CHtml::submitButton($model->isNewRecord ? 'Create' : 'Save', array('class'=>'ax-btn')); ?>
                </td>
                <td></td>
	</tr>
        </tbody>
    </table>
<?php $this->endWidget(); ?>

</div><!-- form -->
<?php $this->endWidget(); ?>